/**
 * 
 */
package com.omega.controller;

import java.security.Principal;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author vpan14
 * 
 */
@Controller
public class HomePageController {

	@RequestMapping(value = { "/", "/home"}, method = RequestMethod.GET)
	public String goToHomePage(Model model, Principal principal) {
		model.addAttribute("userName", principal.getName());
		return "home";
	}
	
	@RequestMapping(value = "/admin/home", method = RequestMethod.GET)
	public String goToAdminHomePage(Model model, Principal principal) {
//		model.addAttribute("userName", principal.getName());
		return "adminHome";
	}
	
	@RequestMapping(value = "/user/home", method = RequestMethod.GET)
	public String goToUserHomePage(Model model, Principal principal) {
//		model.addAttribute("userName", principal.getName());
		return "userHome";
	}
}
